import zrender from 'zrender/zrender'
import color from 'zrender/tool/color'
import Trochoid from 'zrender/graphic/shape/Trochoid'

export default {
  mounted() {
    const zr = zrender.init(this.$refs.chart)
    const trochoid = new Trochoid({
      shape: {
        cx: 450,
        cy: 200,
        r:50,
        r0:35,
        d:30,
      },
      style: {
        location: 'out',
        stroke: 'blue',
        lineWidth : 2,
        text :'外旋轮曲线',
        textPosition :'inside'
      },
      hoverable : true,   // default true
      draggable : true
    })

    zr.add(trochoid)
  },

  render(h) {
    return (
      <div class="page">
        <div ref="chart" style="width: 100%; height: 600px"></div>
      </div>
    )
  }
}
